package com.ecoolex.ying.space.ws;

import com.ecoolex.framework.common.pojo.Page;
import com.ecoolex.framework.common.pojo.Pagination;
import com.ecoolex.framework.common.pojo.Sorting;
import com.ecoolex.framework.modularize.api.auth.user.ConsumerMember;
import com.ecoolex.ying.space.core.manager.UserWatchManager;
import com.ecoolex.ying.space.entity.UserWatch;
import com.ecoolex.ying.space.pojo.QueryUserWatchDTO;
import com.ecoolex.ying.space.pojo.QueryUserWatchFansDTO;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

@Service
public class UserWatchServiceImpl implements UserWatchService {

    @Autowired
    private UserWatchManager userWatchManager;

    @Override
    public UserWatch getUserWatchByTwoUserId(Integer userId, Integer watchUserId) {
        return userWatchManager.getUserWatchByTwoUserId(userId, watchUserId);
    }

    @Override
    public Pagination<ConsumerMember> queryWatchList(Integer userId, QueryUserWatchDTO query, Sorting[] sorts, Page page) {
        return userWatchManager.queryWatchList(userId, query, sorts, page);
    }

    @Override
    public Pagination<ConsumerMember> queryFansList(Integer userId, QueryUserWatchFansDTO query, Sorting[] sorts, Page page) {
        return userWatchManager.queryFansList(userId, query, sorts, page);
    }

    @Override
    public UserWatch addUserWatch(UserWatch record, String createUser) {
        return userWatchManager.addUserWatch(record, createUser);
    }

    @Override
    public void deleteUserWatch(UserWatch record, String updateUser) {
        userWatchManager.deleteUserWatch(record, updateUser);
    }

	@Override
	public Long watchCount(Integer userId) {
		return userWatchManager.watchCount(userId);
	}

	@Override
	public Long FansCount(Integer userId) {
		return userWatchManager.FansCount(userId);
	}

}
